package org.lboot.flow.event.user;

import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import org.lboot.flow.module.work.FlowWork;
import org.springframework.context.ApplicationEvent;

import java.time.Clock;

/**
 * @author kindear
 * 流程实例回退事件
 * @TODO 清理审计记录
 */
@Slf4j
@Getter
public class FlowBackEvent extends ApplicationEvent {
    FlowWork oldFlow;
    FlowWork newFlow;

    public FlowBackEvent(Object source, FlowWork oldFlow, FlowWork newFlow) {
        super(source);
        this.oldFlow = oldFlow;
        this.newFlow = newFlow;
    }

    public FlowBackEvent(Object source, Clock clock) {
        super(source, clock);
    }
}
